/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-06-28 09:40:58
 * @LastEditTime: 2019-06-30 10:29:34
 * @Description: http://www.sbotlp.com.cn
 */
import * as React from 'react';
import { AppState } from 'src/app/model/app.service';
import { CoreModel } from 'src/app/model/coreModel';
export class BaseModule implements React.PureComponent {
  context: any;
  // tslint:disable-next-line:member-ordering
  props: Readonly<{}> & Readonly<{ children?: import('node_modules/@types/react/index').ReactNode; }>;
  // tslint:disable-next-line:member-ordering
  state: Readonly<{}>;
  refs: { [key: string]: import('node_modules/@types/react/index').ReactInstance; };
  constructor(
    public Props: React.Props<any>,
    public appState: AppState,
    public coreModel: CoreModel
  ) {
    console.log('组件初始化');
  }
  // tslint:disable-next-line:max-line-length
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void {
    throw new Error('Method not implemented.');
  }
  forceUpdate(callBack?: (() => void) | undefined): void {
    throw new Error('Method not implemented.');
  }
  render(): import('node_modules/@types/react/index').ReactNode {
    throw new Error('Method not implemented.');
  }
  componentWillMount() {
    console.log('组件马上就要挂载了');
  }
  componentDidMount() {
    console.log('组件挂载完毕');
  }
  componentWillReceiveProps() {
    this.props = this.Props
    console.log('组件开始接收父组件值');
  }
  shouldComponentUpdate() {
    console.log('父组件值接收完毕，执行页面是否更新');
    return true
  }
  componentWillUpdate() {
    console.log('组件开始更新');
  }
  componentDidUpdate() {
    console.log('组件更新完毕');
  }
  componentWillUnmount() {
    console.log('组件卸载');
  }
}
